<template>
	<div>App父级组件</div>
	<h3>msg:{{ msg }}</h3>
	<button @click="msg += '?????'">更新数据</button>
	<hr />
	<Child :msg="msg" />
</template>

<script lang="ts">
import { defineComponent, ref } from "vue"
// 引入子级组件Child
import Child from "./components/Child.vue"
export default defineComponent({
	name: "App",
	components: {
		Child
	},
	setup() {
		// 定义一个ref类型的数据
		const msg = ref("what are you doing?")
		return {
			msg
		}
	}
})
</script>
